<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">


<head th:replace="fragments/common_header :: common-header(~{},~{})"></head>
<body>
<div id="wrapper">
    <!-- 左侧菜单栏-->
    <div th:replace="fragments/common_leftmenu :: left-menu"></div>
    <!-- 左侧菜单栏结束-->
    <div id="page-wrapper" class="gray-bg">
        <!-- 上部导航条 -->
        <div th:replace="fragments/common_top :: top-bar"></div>
        <!-- 上部导航条结束 -->
        <!--内容-->
        <div class="wrapper wrapper-content animated ">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox ">
                        <div class="ibox-title">
                            <h2 th:text="'当前编辑的汽车编号：'+${order.getOrder_number()}"></h2>
                        </div>
                        <div class="ibox-content">
                            <form th:method="post" th:action="@{/order/update}">
                                <h3>编辑订单属性</h3>
                                <div class="form-group row">

                                    <div class="col-sm-2">
                                        <label class="col-form-label">取车时间：</label>
                                        <input type="text" class="form-control" name="take_time" required="" maxlength="20"
                                               th:value="${order.getTake_time()}" placeholder="取车时间">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">还车时间：</label>
                                        <input type="text" class="form-control" name="return_time"  maxlength="20"
                                               th:value="${order.getReturn_time()}" placeholder="还车时间">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">汽车编号：</label>
                                        <input type="text" class="form-control" name="car_number"  maxlength="20"
                                               th:value="${order.getCar_number()}" placeholder="汽车编号">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">取车门店编号：</label>
                                        <input type="text" class="form-control" name="take_shop_number"  maxlength="20"
                                               th:value="${order.getTake_shop_number()}" placeholder="取车门店编号">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">还车门店编号：</label>
                                        <input type="text" class="form-control" name="return_shop_number"  maxlength="20"
                                               th:value="${order.getReturn_shop_number()}" placeholder="还车门店编号">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">订单时间：</label>
                                        <input type="text" class="form-control" name="order_time"  maxlength="20"
                                               th:value="${order.getOrder_time()}" placeholder="订单时间">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">取车地点：</label>
                                        <input type="text" class="form-control" name="take_place"  maxlength="20"
                                               th:value="${order.getTake_place()}" placeholder="取车地点">
                                    </div>
                                   <div class="col-sm-2">
                                    <label class="col-form-label">取车门店名称：</label>
                                    <input type="text" class="form-control" name="take_shop_name"  maxlength="20"
                                           th:value="${order.getTake_shop_name()}" placeholder="取车门店名称">
                                </div><div class="col-sm-2">
                                    <label class="col-form-label">用户身份证号：</label>
                                    <input type="text" class="form-control" name="user_id"  maxlength="20"
                                           th:value="${order.getUser_id()}" placeholder="用户身份证号">
                                </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">车辆类型：</label>
                                        <input type="text" class="form-control" name="car_type"  maxlength="20"
                                               th:value="${order.getCar_type()}" placeholder="车辆类型">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">汽车名称：</label>
                                        <input type="text" class="form-control" name="car_name"  maxlength="20"
                                               th:value="${order.getCar_name()}" placeholder="汽车名称">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">订单金额：</label>
                                        <input type="text" class="form-control" name="order_amount"  maxlength="20"
                                               th:value="${order.getOrder_amount()}" placeholder="订单金额">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">汽车押金：</label>
                                        <input type="text" class="form-control" name="car_deposit" maxlength="20"
                                               th:value="${order.getCar_deposit()}" placeholder="汽车押金">
                                    </div>
                                    <div class="col-sm-2">
                                        <label class="col-form-label">用户电话：</label>
                                        <input type="text" class="form-control" name="user_phone" maxlength="20"
                                               th:value="${order.getUser_phone()}" placeholder="用户电话">
                                    </div>

                                </div>



                                <!--隐藏区域开始-->
                                <input type="hidden" class="form-control" name="order_number" th:value="${order.getOrder_number()}"/>
                                <input type="hidden" class="form-control" name="order_state" th:value="${order.getOrder_state()}"/>
                                <!--隐藏区域结束-->
                                <div class="form-group">
                                    <div class="text-center">
                                        <button class="btn btn-white btn-lg" type="button" onclick="doCancel();">取消</button>
                                        <button class="btn btn-primary btn-lg" type="submit">保存</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!--内容结束-->
        <!-- 底部栏 -->
        <div th:replace="fragments/common_footer :: foot-bar"></div>
        <!-- 底部栏结束 -->
    </div>
</div>
<div th:replace="fragments/common_script :: scripts"></div>
<script>
    // 取消按钮
    function doCancel()
    {
        window.location.href = document.referrer;
    }
</script>
</body>
</html>